package com.autoagent.ai_live_master.scriptRecommendation.Enum;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum InterestEnum {
    UNLIMITED("unlimited", "不限"),
    GAME("game", "游戏"),
    FOOD("food", "餐饮美食"),
    LIFE_SERVICE("life_service", "生活服务"),
    HOME_DECORATION("home_decoration", "家居家装"),
    BUSINESS_SERVICE("business_service", "商务服务"),
    ELECTRONICS("electronics", "家电数码"),
    EDUCATION("education", "教育"),
    BEAUTY_CARE("beauty_care", "美妆护肤护理"),
    TRAVEL("travel", "旅游"),
    MATERNAL_INFANT("maternal_infant", "母婴"),
    SOFTWARE("software", "应用软件"),
    DAILY_GOODS("daily_goods", "日常百货"),
    PET_LIFE("pet_life", "宠物生活"),
    MOBILE_COMPUTER("mobile_computer", "手机电脑"),
    FASHION_ACCESSORIES("fashion_accessories", "服饰鞋帽箱包"),
    NEWS("news", "新闻资讯"),
    COMICS_NOVELS("comics_novels", "小说漫画"),
    TRANSPORTATION("transportation", "交通"),
    SPORTS_OUTDOOR("sports_outdoor", "运动户外旅游"),
    FINANCE("finance", "金融");

    private final String value;
    private final String label;

    InterestEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    @JsonValue
    public String getValue() {
        return value;
    }

    @JsonCreator
    public static InterestEnum fromValue(String value) {
        for (InterestEnum item : InterestEnum.values()) {
            if (item.value.equals(value)) {
                return item;
            }
        }
        throw new IllegalArgumentException("无效的兴趣类型: " + value);
    }
}

